package com.zyy.meetObject3;

public class BankTest {
    public static void main(String[] args) {
        Bank bank1 = Bank.getInstance();
    }
}
class Bank{
    //1。类的构造器私有化
    private Bank(){

    }
    //再类的内部创建当前实例
    private static Bank instance = new Bank();
    public static Bank getInstance(){
        return instance;
    }
}
